﻿//-----------------------------------------------------------------------------------------
// <copyright file="FlakerService.Bookmark.cs" company="Jakub Florczyk (www.jakubflorczyk.pl)">
//      Copyright © 2009 Jakub Florczyk (www.jakubflorczyk.pl)
//      http://flakernet.codeplex.com
// </copyright>
//-----------------------------------------------------------------------------------------

namespace FlakerNET
{
    using System;
    using System.Globalization;
    using FlakerNET.Containers;

    /// <summary>
    /// Flaker serwis.
    /// </summary>
    public partial class FlakerService
    {
        /// <summary>
        /// Dodanie ulubionego wpisu.
        /// </summary>
        /// <param name="entryId">Identyfikator wpisu.</param>
        /// <returns>Status operacji.</returns>
        /// <remarks>Metoda wymaga autoryzacji.</remarks>
        public Status AddBookmark(int entryId)
        {
            return RequestGet<StatusContainer>(String.Format(CultureInfo.InvariantCulture, "/type:bookmark/entry_id:{0}/action:set", entryId)).Status;
        }

        /// <summary>
        /// Usunięie ulubionego wpisu.
        /// </summary>
        /// <param name="entryId">Identyfikator wpisu.</param>
        /// <returns>Status operacji.</returns>
        /// <remarks>Metoda wymaga autoryzacji.</remarks>
        public Status DeleteBookmark(int entryId)
        {
            return RequestGet<StatusContainer>(String.Format(CultureInfo.InvariantCulture, "/type:bookmark/entry_id:{0}/action:unset", entryId)).Status;
        }
    }
}
